#!/bin/sh
export LANG=utf-8


sed -i  '/HKEX/d' ../commodityname.xml
sed -i  '/<\/Config>/d' ../commodityname.xml

python3 -m zhconv -w zh-cn < hkex_ft.csv >  hkex.csv
dos2unix hkex.csv
sed 's/\(.*\),\(.*\)/\t<Commodity ID="\1" Name="\2"\/>/g' hkex.csv |iconv -f utf-8 -t gbk >> ../commodityname.xml
echo '</Config>' >> ../commodityname.xml
